<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Dynamic copyright date range generator
 *
 * Generates a range of dates suitable for using as copyright years, e.g. (c) 2007-2008 Kyle Bragger
 */

// ------------------------------------------------------------------------

function copyright_range($base_year)
{
	// get the current year
	$current_year = date('Y');
	
	// if the base year is less than the current year, create a range
	if ($base_year < $current_year)
	{
		$years = "{$base_year}-{$current_year}";
	}
	else
	{
		$years = "{$base_year}";
	}
	return $years;
}
?>